package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.RoleMenuRelation;
import com.sc.nft.mapper.RoleMenuRelationMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * 角色菜单关系表(pro_role_menu_relation)数据DAO
 *
 * @author zhangxiangyu
 * @since 2022-02-02 17:11:20
 * @description 
 */
@Slf4j
@Repository
public class RoleMenuRelationDao extends ServiceImpl<RoleMenuRelationMapper, RoleMenuRelation> {

    public void deleteByRoleId(Long roleId){
        UpdateWrapper queryWrapper = new UpdateWrapper();
        queryWrapper.set("is_delete",Boolean.TRUE);
        queryWrapper.eq("role_id",roleId);
        update(queryWrapper);
    }
}